import { ref, reactive } from "vue";
/**
 * @description 分类
 * @returns {Array} 分类
 * @returns {Number} 当前选中的分类
 * @returns {Function} 切换分类
 */
export default function useClassfy(list = []) {
  //分类列表
  const classfyList = ref(list);
  const currentIndex = ref(0);
  const classfyChange = ({ index, item }) => {
    currentIndex.value = index;
  };
  return {
    classfyList,
    currentIndex,
    classfyChange,
  };
}
